
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    request.setCharacterEncoding("utf-8");
    String username = request.getParameter("username");
    String password  = request.getParameter("password");

    //admin
    if ("admin".equals(username)&&"123456".equals(password)){
        session.setAttribute("username", "admin");
        //设置session失效时间
//        session.setMaxInactiveInterval(1*10);
        response.sendRedirect("manager.jsp");
        //转发


    }else{
        response.sendRedirect("login.jsp");
    }
%>